package com.ruoyi.school.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.school.mapper.CourseSceneMapper;
import com.ruoyi.school.domain.CourseScene;
import com.ruoyi.school.service.ICourseSceneService;

/**
 * 上课场景图片Service业务层处理
 * 
 * @author admin
 * @date 2023-08-31
 */
@Service
public class CourseSceneServiceImpl implements ICourseSceneService 
{
    @Autowired
    private CourseSceneMapper courseSceneMapper;

    /**
     * 查询上课场景图片
     * 
     * @param id 上课场景图片主键
     * @return 上课场景图片
     */
    @Override
    public CourseScene selectCourseSceneById(Integer id)
    {
        return courseSceneMapper.selectCourseSceneById(id);
    }

    /**
     * 查询上课场景图片列表
     * 
     * @param courseScene 上课场景图片
     * @return 上课场景图片
     */
    @Override
    public List<CourseScene> selectCourseSceneList(CourseScene courseScene)
    {
        return courseSceneMapper.selectCourseSceneList(courseScene);
    }

    /**
     * 新增上课场景图片
     * 
     * @param courseScene 上课场景图片
     * @return 结果
     */
    @Override
    public int insertCourseScene(CourseScene courseScene)
    {
        courseScene.setCreateTime(DateUtils.getNowDate());
        return courseSceneMapper.insertCourseScene(courseScene);
    }

    /**
     * 修改上课场景图片
     * 
     * @param courseScene 上课场景图片
     * @return 结果
     */
    @Override
    public int updateCourseScene(CourseScene courseScene)
    {
        courseScene.setUpdateTime(DateUtils.getNowDate());
        return courseSceneMapper.updateCourseScene(courseScene);
    }

    /**
     * 批量删除上课场景图片
     * 
     * @param ids 需要删除的上课场景图片主键
     * @return 结果
     */
    @Override
    public int deleteCourseSceneByIds(Integer[] ids)
    {
        return courseSceneMapper.deleteCourseSceneByIds(ids);
    }

    /**
     * 删除上课场景图片信息
     * 
     * @param id 上课场景图片主键
     * @return 结果
     */
    @Override
    public int deleteCourseSceneById(Integer id)
    {
        return courseSceneMapper.deleteCourseSceneById(id);
    }
}
